package com.zmn.plat.common.dictionary;

import com.zmn.common.dictionary.DictModel;
import com.zmn.plat.common.constant.ItemCategoryConsts;

import java.util.ArrayList;
import java.util.List;

/**
 * 类描述:故障相关字典
 *
 * @author linfeng
 * @since 2019/11/25/14:45
 */
public class ItemCategoryDict {

    /**
     * 故障类型集合 计价器2.0
     */
    private static final List<DictModel> FAULT_CATEGORY_LIST_ITEMS = new ArrayList<>();

    /**
     * 项目类型集合 计价器3.0
     */
    private static final List<DictModel> ITEM_CATEGORY_LIST = new ArrayList<>();

    /**
     * 故障类型 计价器2.0
     *
     * @return
     */
    public static List<DictModel> getFaultCategoryListItems() {
        if (FAULT_CATEGORY_LIST_ITEMS.size() == 0) {
            FAULT_CATEGORY_LIST_ITEMS.add(new DictModel(ItemCategoryConsts.NORMAL_FAULT, "普通故障"));
            FAULT_CATEGORY_LIST_ITEMS.add(new DictModel(ItemCategoryConsts.OTHER_SERVICES, "其他服务"));
            FAULT_CATEGORY_LIST_ITEMS.add(new DictModel(ItemCategoryConsts.SPECIAL_FAULT, "特殊故障"));
            FAULT_CATEGORY_LIST_ITEMS.add(new DictModel(ItemCategoryConsts.MATERIAL_COST, "材料费"));
            FAULT_CATEGORY_LIST_ITEMS.add(new DictModel(ItemCategoryConsts.VALUE_ADD_SERVICE, "增值服务"));
            FAULT_CATEGORY_LIST_ITEMS.add(new DictModel(ItemCategoryConsts.SERVICE_CHARGE, "服务收费"));
        }
        return FAULT_CATEGORY_LIST_ITEMS;
    }

    /**
     * 描述: 项目类型 计价器3.0
     *
     * @author guoqiao
     * @since 2021/11/17 14:12
     */
    public static List<DictModel> getItemCategoryList() {
        if (ITEM_CATEGORY_LIST.size() == 0) {
            ITEM_CATEGORY_LIST.add(new DictModel(ItemCategoryConsts.MAINTAIN_ITEM, "维修项目"));
            ITEM_CATEGORY_LIST.add(new DictModel(ItemCategoryConsts.ADDITION_ITEM, "附加项目"));
            ITEM_CATEGORY_LIST.add(new DictModel(ItemCategoryConsts.OTHER_ITEM, "其他"));
        }
        return ITEM_CATEGORY_LIST;
    }
}
